$(function () {
    //获取西安校区元素
    var ca_morning_1 = $(".ca_mornig-1");
    var ca_morning_2 = $(".ca_mornig-2");
    var ca_afternoon_1 = $(".ca_afternoon-1");
    var ca_afternoon_2 = $(".ca_afternoon-2");
    //获取上海校区元素
    var sh_morning_1 = $(".sh_mornig-1");
    var sh_morning_2 = $(".sh_mornig-2");
    var sh_afternoon_1 = $(".sh_afternoon-1");
    var sh_afternoon_2 = $(".sh_afternoon-2");
    //获取日本校区元素
    var jp_morning_1 = $(".jp_mornig-1");
    var jp_morning_2 = $(".jp_mornig-2");
    var jp_afternoon_1 = $(".jp_afternoon-1");
    var jp_afternoon_2 = $(".jp_afternoon-2");
    //获取杭州校区元素
    var hz_morning_1 = $(".hz_mornig-1");
    var hz_morning_2 = $(".hz_mornig-2");
    var hz_afternoon_1 = $(".hz_afternoon-1");
    var hz_afternoon_2 = $(".hz_afternoon-2");
    //获取北京校区元素
    var bj_morning_1 = $(".bj_mornig-1");
    var bj_morning_2 = $(".bj_mornig-2");
    var bj_afternoon_1 = $(".bj_afternoon-1");
    var bj_afternoon_2 = $(".bj_afternoon-2");
    //获取成都校区元素
    var cd_morning_1 = $(".cd_mornig-1");
    var cd_morning_2 = $(".cd_mornig-2");
    var cd_afternoon_1 = $(".cd_afternoon-1");
    var cd_afternoon_2 = $(".cd_afternoon-2");
    //获取Georgia校区元素
    var ge_morning_1 = $(".ge_mornig-1");
    var ge_morning_2 = $(".ge_mornig-2");
    var ge_afternoon_1 = $(".ge_afternoon-1");
    var ge_afternoon_2 = $(".ge_afternoon-2");


    
    
    //西安校区元素操作
    ca_morning_1.click(function () {
        if(this.checked || this.checked=='checked'){
            ca_morning_1.removeAttr("checked");
            $(this).prop("checked", true);
}
});
    ca_morning_2.click(function () {
        if(this.checked || this.checked=='checked'){
            ca_morning_2.removeAttr("checked");
            $(this).prop("checked", true);
        }
    });
    ca_afternoon_1.click(function () {
        if(this.checked || this.checked=='checked'){
            ca_afternoon_1.removeAttr("checked");
            $(this).prop("checked", true);
        }
    });
    ca_afternoon_2.click(function () {
        if(this.checked || this.checked=='checked'){
            ca_afternoon_2.removeAttr("checked");
            $(this).prop("checked", true);
        }
    });


    //上海校区元素操作
    sh_morning_1.click(function () {
        if(this.checked || this.checked=='checked'){
            sh_morning_1.removeAttr("checked");
            $(this).prop("checked", true);
        }
    });
    sh_morning_2.click(function () {
        if(this.checked || this.checked=='checked'){
            sh_morning_2.removeAttr("checked");
            $(this).prop("checked", true);
        }
    });
    sh_afternoon_1.click(function () {
        if(this.checked || this.checked=='checked'){
            sh_afternoon_1.removeAttr("checked");
            $(this).prop("checked", true);
        }
    });
    sh_afternoon_2.click(function () {
        if(this.checked || this.checked=='checked'){
            sh_afternoon_2.removeAttr("checked");
            $(this).prop("checked", true);
        }
    });

    //日本校区元素操作
    jp_morning_1.click(function () {
        if(this.checked || this.checked=='checked'){
            jp_morning_1.removeAttr("checked");
            $(this).prop("checked", true);
        }
    });
    jp_morning_2.click(function () {
        if(this.checked || this.checked=='checked'){
            jp_morning_2.removeAttr("checked");
            $(this).prop("checked", true);
        }
    });
    jp_afternoon_1.click(function () {
        if(this.checked || this.checked=='checked'){
            jp_afternoon_1.removeAttr("checked");
            $(this).prop("checked", true);
        }
    });
    jp_afternoon_2.click(function () {
        if(this.checked || this.checked=='checked'){
            jp_afternoon_2.removeAttr("checked");
            $(this).prop("checked", true);
        }
    });

    //杭州校区元素操作
    hz_morning_1.click(function () {
        if(this.checked || this.checked=='checked'){
            hz_morning_1.removeAttr("checked");
            $(this).prop("checked", true);
        }
    });
    hz_morning_2.click(function () {
        if(this.checked || this.checked=='checked'){
            hz_morning_2.removeAttr("checked");
            $(this).prop("checked", true);
        }
    });
    hz_afternoon_1.click(function () {
        if(this.checked || this.checked=='checked'){
            hz_afternoon_1.removeAttr("checked");
            $(this).prop("checked", true);
        }
    });
    hz_afternoon_2.click(function () {
        if(this.checked || this.checked=='checked'){
            hz_afternoon_2.removeAttr("checked");
            $(this).prop("checked", true);
        }
    });


    //北京校区元素操作
    bj_morning_1.click(function () {
        if(this.checked || this.checked=='checked'){
            bj_morning_1.removeAttr("checked");
            $(this).prop("checked", true);
        }
    });
    bj_morning_2.click(function () {
        if(this.checked || this.checked=='checked'){
            bj_morning_2.removeAttr("checked");
            $(this).prop("checked", true);
        }
    });
    bj_afternoon_1.click(function () {
        if(this.checked || this.checked=='checked'){
            bj_afternoon_1.removeAttr("checked");
            $(this).prop("checked", true);
        }
    });
    bj_afternoon_2.click(function () {
        if(this.checked || this.checked=='checked'){
            bj_afternoon_2.removeAttr("checked");
            $(this).prop("checked", true);
        }
    });

    //成都校区元素操作
    cd_morning_1.click(function () {
        if(this.checked || this.checked=='checked'){
            cd_morning_1.removeAttr("checked");
            $(this).prop("checked", true);
        }
    });
    cd_morning_2.click(function () {
        if(this.checked || this.checked=='checked'){
            cd_morning_2.removeAttr("checked");
            $(this).prop("checked", true);
        }
    });
    cd_afternoon_1.click(function () {
        if(this.checked || this.checked=='checked'){
            cd_afternoon_1.removeAttr("checked");
            $(this).prop("checked", true);
        }
    });
    cd_afternoon_2.click(function () {
        if(this.checked || this.checked=='checked'){
            cd_afternoon_2.removeAttr("checked");
            $(this).prop("checked", true);
        }
    });
    //Georgia校区元素操作
    ge_morning_1.click(function () {
        if(this.checked || this.checked=='checked'){
            ge_morning_1.removeAttr("checked");
            $(this).prop("checked", true);
        }
    });
    ge_morning_2.click(function () {
        if(this.checked || this.checked=='checked'){
            ge_morning_2.removeAttr("checked");
            $(this).prop("checked", true);
        }
    });
    ge_afternoon_1.click(function () {
        if(this.checked || this.checked=='checked'){
            ge_afternoon_1.removeAttr("checked");
            $(this).prop("checked", true);
        }
    });
    ge_afternoon_2.click(function () {
        if(this.checked || this.checked=='checked'){
            ge_afternoon_2.removeAttr("checked");
            $(this).prop("checked", true);
        }
    });



    var s_agree = $(".s-agree");
    s_agree.click(function () {
        $.ajax({
            url : "/agreement",
            dataType : "json",
            type : "post",
            data :{userId:123,agreeType:2,} ,
        })
    })


  //结束
});
